package com.orderMeal.business.index.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.orderMeal.business.index.model.IndexShowPictureModel;
import com.orderMeal.business.index.service.IndexService;
import com.orderMeal.common.action.BaseAction;
import com.orderMeal.common.bean.BaseTO;
@Controller("indexAction")
public class IndexAction extends BaseAction {
	private static final long serialVersionUID = -2449086038121362145L;
	@Resource(name="indexService")
	private IndexService indexService;
	/**
	 * 首页展示逻辑元素
	 * @return
	 */
	public String showIndex(){
		System.out.println("==================");
		List<BaseTO> picturesList = indexService.queryAll("from IndexShowPictureModel pic order by pic.picture_order asc");
		super.setRequestAttribute("picturesList", picturesList);
		return "showIndex";
	}
	public String showSelectArea(){
		return "selectArea";
	}
}
